package com.xhwl.logistics.converter.mapstruct;


import com.xhwl.logistics.bo.VehicleCarportBO;
import com.xhwl.logistics.dto.http.CarportChuangXiangDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueMappingStrategy;

/**
 * 将第三方查询的车位使用信息转换为中台的车位使用信息
 */
@Mapper(componentModel = "spring", nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT)
public interface VehicleCarportUseInfoThirdConverter {

    /**
     * 将创享的车位使用信息转换为中台的车位使用信息
     */
    @Mapping(target = "totalNumber", source = "carportChuangXiangDTO.totalLot")
    @Mapping(target = "freeNumber", source = "carportChuangXiangDTO.emptyLot")
    VehicleCarportBO chuangXiangtoVehicleCarportBO(CarportChuangXiangDTO carportChuangXiangDTO);
}
